package cn.z2huo.knowledge.concurrency.atomic;

import java.util.concurrent.atomic.AtomicInteger;

/**
 * <p>
 *
 * @author z2huo
 */
class AtomicIntegerTest {

    private AtomicInteger atomicInteger = new AtomicInteger(1);

    public static void main(String[] args) {
        AtomicIntegerTest atomicIntegerTest = new AtomicIntegerTest();
        System.out.println(atomicIntegerTest.atomicInteger.get());

        System.out.println(atomicIntegerTest.atomicInteger.incrementAndGet());
        System.out.println(atomicIntegerTest.atomicInteger.get());

        System.out.println(atomicIntegerTest.atomicInteger.getAndIncrement());
        System.out.println(atomicIntegerTest.atomicInteger.get());
    }

}
